package com.swanclouds.redfish.managers.domain;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

public class IPv6Addresses {

    //指定BMC网口的IPv6地址（仅在AddressOrigin为Static时有该字段）
    @JsonProperty("Address")
    private String address;

    //指定BMC网口的IPv6地址对应的前缀长度（仅在AddressOrigin为Static时有该字段）
    @JsonProperty("PrefixLength")
    private String prefixLength;

    /**
     * 指定BMC网口的IPv6地址模式，包括：
     * Static
     * DHCPv6
     * LinkLocal
     * SLAAC
     */
    @JsonProperty("AddressOrigin")
    private String addressOrigin;

    @Override
    public String toString() {
        ObjectMapper objectMapper = new ObjectMapper();
        try {
            return objectMapper.writeValueAsString(this);
        } catch (JsonProcessingException e) {
        }
        return "IPv6Addresses{" +
                "address='" + address + '\'' +
                ", prefixLength='" + prefixLength + '\'' +
                ", addressOrigin='" + addressOrigin + '\'' +
                '}';
    }
}
